<?php

/**
 * This is the model class for table "jumlahkasuskekerasantempat".
 *
 * The followings are the available columns in table 'jumlahkasuskekerasantempat':
 * @property integer $jkkt_id
 * @property string $jkkt_bulan
 * @property integer $jkkt_kasus
 * @property integer $jkkt_rt_istri
 * @property integer $jkkt_rt_anak
 * @property integer $jkkt_rt_incest
 * @property integer $jkkt_rt_kdk
 * @property integer $jkkt_pub_trafficking
 * @property integer $jkkt_pub_perkosaan
 * @property integer $jkkt_pub_pencabulan
 * @property integer $jkkt_pub_kdp
 * @property integer $jkkt_tahun
 */
class Jumlahkasuskekerasantempat extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Jumlahkasuskekerasantempat the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'jumlahkasuskekerasantempat';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('jkkt_kasus, jkkt_rt_istri, jkkt_rt_anak, jkkt_rt_incest, jkkt_rt_kdk, jkkt_pub_trafficking, jkkt_pub_perkosaan, jkkt_pub_pencabulan, jkkt_pub_kdp, jkkt_tahun', 'numerical', 'integerOnly'=>true),
			array('jkkt_bulan', 'length', 'max'=>45),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('jkkt_id, jkkt_bulan, jkkt_kasus, jkkt_rt_istri, jkkt_rt_anak, jkkt_rt_incest, jkkt_rt_kdk, jkkt_pub_trafficking, jkkt_pub_perkosaan, jkkt_pub_pencabulan, jkkt_pub_kdp, jkkt_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'jkkt_id' => 'Jkkt',
			'jkkt_bulan' => 'Jkkt Bulan',
			'jkkt_kasus' => 'Jkkt Kasus',
			'jkkt_rt_istri' => 'Jkkt Rt Istri',
			'jkkt_rt_anak' => 'Jkkt Rt Anak',
			'jkkt_rt_incest' => 'Jkkt Rt Incest',
			'jkkt_rt_kdk' => 'Jkkt Rt Kdk',
			'jkkt_pub_trafficking' => 'Jkkt Pub Trafficking',
			'jkkt_pub_perkosaan' => 'Jkkt Pub Perkosaan',
			'jkkt_pub_pencabulan' => 'Jkkt Pub Pencabulan',
			'jkkt_pub_kdp' => 'Jkkt Pub Kdp',
			'jkkt_tahun' => 'Jkkt Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('jkkt_id',$this->jkkt_id);
		$criteria->compare('jkkt_bulan',$this->jkkt_bulan,true);
		$criteria->compare('jkkt_kasus',$this->jkkt_kasus);
		$criteria->compare('jkkt_rt_istri',$this->jkkt_rt_istri);
		$criteria->compare('jkkt_rt_anak',$this->jkkt_rt_anak);
		$criteria->compare('jkkt_rt_incest',$this->jkkt_rt_incest);
		$criteria->compare('jkkt_rt_kdk',$this->jkkt_rt_kdk);
		$criteria->compare('jkkt_pub_trafficking',$this->jkkt_pub_trafficking);
		$criteria->compare('jkkt_pub_perkosaan',$this->jkkt_pub_perkosaan);
		$criteria->compare('jkkt_pub_pencabulan',$this->jkkt_pub_pencabulan);
		$criteria->compare('jkkt_pub_kdp',$this->jkkt_pub_kdp);
		$criteria->compare('jkkt_tahun',$this->jkkt_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}